// 邮箱验证
export const  checkEmail = (rule, value, cb) => {
  const regEmail =
    /^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/;
  if (regEmail.test(value)) {
    return cb();
  }
  cb(new Error("请输入合法的邮箱"));
};

//验证手机规则
export const chenckMobile = (rule, value, cb) => {
  const regMobile = /^[1][3,4,5,7,8][0-9]{9}$/;
  if (regMobile.test(value)) {
    return cb();
  }
  cb(new Error("请输入合法手机号"));
};